package cn.jindong.mall.product.feign;

import cn.jindong.common.utils.R;
import cn.jindong.mall.product.fallback.SeckillFeignServiceFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author LYX
 * @data 2022/4/8 11:02
 */
@FeignClient(value = "jindong-seckill",fallback = SeckillFeignServiceFallBack.class)
@Component
public interface SeckillFeignService {

    /**
     * 根据skuId查询商品是否参加秒杀活动
     * @param skuId
     * @return
     */
    @GetMapping(value = "/sku/seckill/{skuId}")
    R getSkuSeckillInfo(@PathVariable("skuId") Long skuId);

}